import request from "../utils/request";

export function getTaskList(){
    return request.get('/task/list');
}

export function getICanApprovedTask(){
    return request.get('/task/getICanApprovedTask');
}

export function addTask(params){
    return request.post('/task/addTask', params);
} 

export function deleteTaskById(id){
    return request.delete(`/task/deleteTaskById/${id}`);
}

export function getTaskDetailById(id){
    return request.get(`/task/getTaskDetailById/${id}`);
}

export function getMyTaskList(){
    return request.get(`/task/getMyTaskList`);
}

export function updateTheTask(params){
    return request.post(`/task/updateTheTask`,params);
}

export function getSomeTasks(){
    return request.get(`/task/getSomeTasks`);
}

export function updateTask(data){
    return request.put(`/task/updateTask`,data);
}